
package com.app.bimo.module_bookrack.mvp.model.model;



import com.app.bimo.commonbusiness.bean.BaseResult;
import com.app.bimo.commonbusiness.network.RetrofitServiceManager;
import com.app.bimo.library_db.SearchData;
import com.app.bimo.library_db.SearchHistory;
import com.app.bimo.module_bookrack.BuildConfig;
import com.app.bimo.module_bookrack.mvp.constract.BookrackSearchContract;
import com.app.bimo.module_bookrack.mvp.model.api.service.BookrackService;

import java.util.List;

import io.reactivex.Observable;

public class BookrackSearchModel implements BookrackSearchContract.Model {


    @Override
    public void onDestroy() {

    }


    @Override
    public Observable<BaseResult<List<SearchData>>> getHotSearch() {
        return RetrofitServiceManager.getInstance().createRetrofit(BuildConfig.APPLICATION_ID, BookrackService.class).getHotSearch();

    }

    @Override
    public Observable<BaseResult<List<SearchData>>> getSearch(String keyword, int page) {
        return RetrofitServiceManager.getInstance().createRetrofit(BuildConfig.APPLICATION_ID, BookrackService.class).getSearch(keyword, page);

    }

    @Override
    public Observable<BaseResult<List<SearchHistory>>> getSearchHistory() {
        return null;

    }
}
